//*********************************************************
//
// factor = material reflection color
//
// Output Registers used:
//   oPos - The vertex output position.
//   oT0  - original UV
//   oT1  - reflection UV
//   oD0  - diffuse color
//   oD1  - specular color
//
// Texture Combiner Assumed
//   stage0 - base
//   stage1 - reflection
// Result = stage0 * oD0 + oD1 + factor * stage1
//
//*********************************************************

m4x4 r0, inPos, c[MODEL_VIEW_PROJECTION]
mov oPos, r0

mov oT0, inUV

mov r0, c[MATERIAL_EMISSIVE_OPACITY]
mul oD0.rgb, r0, c[CONSTANT_0_05_1_2].y // color * 0.5 to compensate MUTIPLY_X2 for emissive in the first stage
mul oD0.a, r0, inNormal.w		// alpha * fog to make objects dissove

mov oD1, c[CONSTANT_0_05_1_2].x

// oT1 is calculated here
#include "..\common\_reflection.vsh"
